from selenium import webdriver

driver = webdriver.Chrome("D:/download_soft/chromedriver-win64/chromedriver-win64/chromedriver.exe")

# 需要打开的地址
url = "D:/projects/spider/day03滑块/test.html"

driver.get(url)
driver.maximize_window()  # 窗口最大化

# print(driver.page_source)

"""
切换 iframe
1、通过id
2、name
3、索引
4、元素对象

"""
# 用id
# driver.switch_to.frame("aframe")

# 用名称
# driver.switch_to.frame("framea")

# 用索引

# driver.switch_to.frame(0)


# 使用元素对象

# aframe = driver.find_element_by_id("aframe")
# driver.switch_to.frame(aframe)
#
# print(driver.page_source)




